package jianzhiOffer;

public class Num56_2 {
    public int singleNumber(int[] nums) {
        int one = 0,two = 0;
        for(int i : nums) {
            one = one ^ i & ~two;
            two = two ^ i & ~one;
        }
        return one;
    }
}
